# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-suncalc
_pkgname=${pkgname#python-}
pkgver=0.1.3
pkgrel=3
pkgdesc='A Python port of suncalc.js for calculating sun position and sunlight phases.'
arch=('any')
url='https://github.com/kylebarron/suncalc-py'
license=('MIT')
depends=('python' 'python-numpy')
makedepends=('python-setuptools')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d4a3dd9f8fbefc9d202239468b0c484ea75d68699d7d50648a8521089fcbe7dcf6a5e1dcabf19cd0a2c60964296ad0aa04c8a855c6cdd0d9c48f7234ef99a61e')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

